package com.tjetc.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author zc
 * @Date 2025/7/7 上午11:50
 */
@Component
public class HelloReceiver {
    @RabbitListener(queues = "hello") //监听hello队列的消息,hello队列一旦有消息由该方法处理 (推荐该方法)
    public void processMessage(String msg){
        System.out.println("msg = " + msg);
    }
}
